package polymorphic;

/**
 * @classname:InstrumentTest
 * @description:
 * @author: Mr.Z
 * @date: 2020/11/28 22:46
 * @version: 0.1
 * @since:1.8
 */
public class InstrumentTest {
    public static void main(String[] args) {

        Instrument piano = new Piano();
        InstrumentTest.testplay(piano);
        Instrument violin = new Violin();
        InstrumentTest.testplay(violin);
    }

    public static void testplay(Instrument instrument) {
        instrument.play();
    }
}
